using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum ItemType
{
    Weapon,
    Potion,
    Scroll,
    Ingredients,
    Treasure
}

[CreateAssetMenu(fileName = "Item", menuName = "游戏SO文件/物品/物品")]
public class InventoryItem : ScriptableObject
{
    [Header("配置")]
    public string ID;
    public string Name;
    public Sprite Icon;
    [TextArea] public string Description;
    
    [Header("信息")]
    public ItemType ItemType;
    public bool IsConsumable;
    public bool IsStackable;
    public int MaxStack;

    [HideInInspector] public int Quantity;

    public InventoryItem CopyItem()
    {
        InventoryItem instance = Instantiate(this);
        return instance;
    }

    public virtual bool UseItem()
    {
        return true;
    }

    public virtual void EquipItem()
    {
        
    }

    public virtual void RemoveItem()
    {
        
    }
}
